export default {
  props: {
    drawShow: {
      type: Boolean,
      default: false
    },
    type: {
      type: null,
      default: 1
    },
    newBlindBoxData: {
      type: null,
      default: {}
    }
  },
  data() {
    return {
      allDataList: []
    };
  },
  mounted() {
    this.getData();
  },
  methods: {
    async getData() {
      let data = await $http.post(this.newBlindBoxData.api, {order_id: this.newBlindBoxData.order_id});
      if (data.result) {
        this.allDataList = data.data.data ? data.data.data : data.data.list;
      } else {
        this.$toast(data.msg);
      }
    },
    close() {
      this.$emit("update:drawShow", false);
    },
    // 跳转到订单详情
    goOrderdetail(data) {
      this.$router.push(this.fun.getUrl("orderdetail", { order_id: data.id }));
    }
  },
};
